import store from "../store";

export function getBaseImageUrl(info) {
  if(info.reviewurl) {
    return info.reviewurl
  }
  if (info.isself === 0) {
    return info.url
  }
  let srcTmp = process.env.VUE_APP_BASE_CLOUDSERVICE_API_URL + '/thumbnail?fid='
  if (info.fid) {
    srcTmp += info.fid
  } else if (info.sourceid) {
    srcTmp += info.sourceid
  }
  srcTmp  += '&corpid=' + store.getters.corpinfo.corpid + '&subid=' + store.getters.subinfo.subid + '&uid=' + store.getters.userinfo.uid
  return srcTmp
}
